﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Imgur.Net.JSON
{
    /// <summary>
    /// All results from Imgur have a data wrapper that specifies a success flag, status code, as well as the actual returned data object if successful.
    /// This class is a wrapper to encapsulate that return data structures.
    /// </summary>
    /// <typeparam name="T">Type of data object to be returned from Imgur</typeparam>
    public class JSONWrapper<T>
    {
        /// <summary>
        /// The data object returned by the previous request.
        /// </summary>
        public T Data { get; set; }
        /// <summary>
        /// Flag denoting that the previous request was successful or not.
        /// </summary>
        public bool Success { get; set; }
        /// <summary>
        /// Status code denoting a more specific error code in the case of failure of a previous request.
        /// </summary>
        public int Status { get; set; }
    }
}
